The present invention relates generally to the data processing field, and more particularly, relates to a method, apparatus and computer program product for dynamically changing hot spots on a draggable windows control.
Many windows applications have controls that can be directly manipulated with the mouse. These controls can often be clicked and dragged from its ends to make the control larger; or clicked and dragged in the middle to change the overall position of the control while keeping its original dimensions. If the control can be sized such that it is very small, often it can be difficult for the user to initiate both types of actions, stretching and repositioning.
It is desirable to enable the user to more easily manipulate a control. When the user passes the mouse over a control, the hot spots for the corresponding actions are analyzed. When a resize or reposition function is detected, a tool tip is surfaced or the cursor is manipulated to indicate which action can be initiated when the mouse is clicked and dragged. Users often encounter problems when resizing or repositioning a window due to various limitations. For example, when resizing or repositioning a window, it is often labor intensive for the user to put the mouse pointer on the desired hot spot for the corresponding action for window resizing or repositioning. This is especially difficult when the user has poor coordination or poor vision, a fast pointer speed, or a small hot spot.
A need exists for a mechanism for dynamically changing hot spots on a draggable windows control. A need exists for a way to easily resize and reposition windows that allows a user to more easily manipulate the control.
A principal object of the present invention is to provide a method, apparatus and computer program product for dynamically changing hot spots on a draggable windows control. Other important objects of the present invention are to provide such methods, apparatus and computer program product for dynamically changing hot spots on a draggable windows control substantially without negative effect; and that overcome many of the disadvantages of prior art arrangements.
In brief, methods, apparatus and a computer program product are provided for dynamically changing hot spots on a draggable windows control. A size of a control is determined. The control size is compared with a predetermined minimum size. Responsive to the control size being less than the predetermined minimum size, top and bottom hot spots beyond ends of the control for stretch hot spots and on the control for move hot spot are calculated. Responsive to the control size being greater than or equal to the predetermined minimum size, a ratio for determining the top and bottom stretch hot spots is calculated.
In accordance with features of the preferred embodiment, the hot spots are dynamically changed depending upon the size of the control.